package com.creditease.shield.flow.client;

import java.net.InetSocketAddress;
import java.util.concurrent.TimeUnit;

import org.apache.commons.lang3.tuple.Pair;

import com.creditease.shield.flow.common.msg.Request;
import com.creditease.shield.flow.common.msg.Response;

public interface IClient {
	void connect(InetSocketAddress socketAddress);
    public Response syncSend(Request request) throws InterruptedException;
    public Response asyncSend(Request request, Pair<Long, TimeUnit> timeout) throws InterruptedException;
    InetSocketAddress getRemoteAddress();
    void close();
}
